package com.uuah.server.config.spring.parsers.delegate;

import org.springframework.beans.factory.config.BeanDefinition;

import com.uuah.server.config.spring.parsers.IUuahDefinitionParser;
import com.uuah.server.config.spring.parsers.IUuahDefinitionParserConfiguration;
import com.uuah.server.config.spring.parsers.UuahChildDefinitionParser;
import com.uuah.server.config.spring.parsers.assembly.configuration.IPropertyConfiguration;

public class AbstractSingleParentFamilyChildDefinitionParser extends
		AbstractSingleParentFamilyDefinitionParser implements
		UuahChildDefinitionParser {

	protected IUuahDefinitionParserConfiguration addDelegate(
			IUuahDefinitionParser delegate) {
		return addDelegateAsChild(delegate);
	}

	public void forceParent(BeanDefinition parent) {
		((UuahChildDefinitionParser) getDelegate(0)).forceParent(parent);
	}

	public IPropertyConfiguration getTargetPropertyConfiguration() {
		return ((UuahChildDefinitionParser) getDelegate(0))
				.getTargetPropertyConfiguration();
	}

}